Repository navigation
fix(opencode-config-normalize): match actual block-comment opener in last-entry separator scan (#4770) - #4775
Conversation
…last-entry separator scan (#4770) delete_top_level_entry located the preceding block comment with a plain backward rfind('/*'), which selects an inner literal /* inside the comment body (e.g. /* example syntax: /* text */) instead of the real opening delimiter, failing closed with exit 1 on a previously supported commented layout. Use a forward lexical scan for the comment closing exactly at the scan point, so string contents and // comments never open a block comment. Also add the regression case and move the suite failure gate to the end of normalize_test.sh so every case affects the exit status.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 50 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
🤖 Agent note · pr opened
|
…-comment-separator # Conflicts: # pkgs/opencode-config-normalize/normalize_test.sh
Fixes #4770.
What
delete_top_level_entryinnormalize.shlocated a preceding block comment with a plain backwardrfind('/*'), which selects an inner literal/*inside the comment body (e.g./* example syntax: /* text */) instead of the real opening delimiter. The scan then failed closed with exit 1 on a previously supported commented layout before a final legacyagententry.Change
normalize.sh: new_block_comment_start_ending_athelper — a forward lexical scan (string- and //-aware) finds the comment closing exactly at the scan point. Replaces therfindin the last-entry separator loop.normalize_test.sh: regression case 24 (inner-/*block comment before finalagent, comment text asserted byte-identical), and the failure-count gate moved to the end of the file so every case — including the previously ungated comment-before-agent-last case — affects the suite exit status.Verification
Queue task 6776 (repo-worker-code, openchamber scheduled lane 8ac61616).
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.